<template>
  <div>
  <router-link tag="div" :to="'/detail/'+list.id" class="newsItem">
    <img :src="list.url" class="newImg" />
    <div class="newsTitle">
      <h2>{{list.title}}</h2>
      <div class="newsTag">
        <span>{{list.cateName }}     {{list.addtime}}</span>
        <span>赞{{list.dz}}</span>
      </div>
    </div>
  </router-link>
  </div>
</template>

<script>
export default {
  name: 'newList',
  props: {
    list: Object
  },
  data () {
    return {
      newsList: []
    }
  }
}
</script>

<style lang="stylus" scoped>
  .newsItem{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    background: #fff;
    padding: .3rem;
    border-bottom: 1px solid #efefef;
  }
  .newImg{
    width: 1.8rem;
    height:1.6rem;
    margin-right: .2rem;
    border-radius: 0rpx;
    background: #efefef;
    display: block;
  }
  .newsTag{
    color: #999;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .newsTitle{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-content: space-between;
    height: 1.6rem;
    flex 1
  }
</style>
